-- GENERATED SPELL FOR [Deatholme Darkmage] --


function spell0_16318(pUnit, Event) --@Curse of Weakness,n/a--
pUnit:FullCastSpellOnTarget(18267,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16318', 30303, 1)
end

function spell1_16318(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16318', 3000, 1)
end

function Sorts_16318(pUnit, Event)
local choix_sorts_16318 = math.random(0, 1)
if choix_sorts_16318 == 0 then
pUnit:RegisterEvent('spell0_16318', 1, 1)
end
if choix_sorts_16318 == 1 then
pUnit:RegisterEvent('spell1_16318', 1, 1)
end
end

function mob16318_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16318', math.random(1500, 3000), 1)
end

function mob16318_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16318_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16318_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16318, 1, 'mob16318_Action')
RegisterUnitEvent(16318, 2, 'mob16318_Leave')
RegisterUnitEvent(16318, 3, 'mob16318_Kill')
RegisterUnitEvent(16318, 4, 'mob16318_Die')
